<link rel="stylesheet" type="text/css" href="|£|$url|\£|/wp-content/plugins/video-wizard/libs/Smarty/templates/css/contests_page.css"/>
<link rel="stylesheet" type="text/css" href="|£|$url|\£|/wp-content/plugins/video-wizard/libs/jqueryUI/css/ui-lightness/jquery-ui-1.8.16.custom.css"/>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/libs/jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/js/contests.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/libs/jqueryUI/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/js/palinsesto_creation.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/libs/jwplayer/jwplayer.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/js/checks.js"></script>
<script type="text/javascript" src="|£|$url|\£|/wp-content/plugins/video-wizard/js/utilities.js"></script>
<script>
    $(function(){
        $("#vidwiz_tabs").tabs()
        });
</script>
<div id="vidwiz_tabs">
    <ul>
		|£|if $administrator == "true" |\£|
                    |£|$nr_upload = "3"|\£|
                    |£|$nr_stats =  "4"|\£|
                    <li><a href="#vidwiz_tabs-1">Nuovo Contest</a></li>
                    <li><a href="|£|$url|\£|/wp-admin/admin-ajax.php?action=getActiveContests">Contest Attivi</a></li>
                    <li><a href="|£|$url|\£|/wp-admin/admin-ajax.php?action=getContestsToUpload">Carica video per i contest</a></li>
                    <li><a href="#vidwiz_tabs-4">Statistiche</a></li>
                |£|/if|\£|
                |£|if $author == "true" |\£|
                    |£|$nr_upload = "1"|\£|
                    |£|$nr_stats =  "2"|\£|
                    <li><a href="|£|$url|\£|/wp-admin/admin-ajax.php?action=getContestsToUpload">Carica video per i contest</a></li>
                    <li><a href="#vidwiz_tabs-2">Statistiche</a></li>
                |£|/if|\£|
    </ul>
|£|if $administrator == "true" |\£|
<div  id="vidwiz_tabs-1">
    <h1>Nuovo contest</h1>
    <form method="POST" id="contestForm">
        <table>
            <tr>
                <td>Titolo Contest:</td>
            </tr>
            <tr>
                <td><input id="title" name="title" type="text"/></td>
            </tr>
            <tr>
                <td>Data inizio iscrizioni:</td>
                <td>Data fine iscrizioni:</td>
            </tr>
            <tr>
                <td>
                    <input name="startDate" id="startDate" type="text"/>
                    <script>
                        $("#startDate").datepicker({
                            dateFormat: 'dd/mm/yy'
                        });
                    </script>
                </td>
                <td>
                    <input  name="stopDate" id="stopDate" type="text"/>
                    <script>
                        $("#stopDate").datepicker({
                            dateFormat: 'dd/mm/yy'
                        });
                    </script>
                </td>
            </tr>
            <tr>
                <td>Giorni utili per gli upload:</td>
                <td>Giorni utili per la votazione:</td>
            </tr>
            <tr>
                <td>
                    <select name="uploadDuration" id="uploadDuration">
                        <option value="3">3 giorni</option>
                        <option value="4">4 giorni</option>
                        <option value="5">5 giorni</option>
                        <option value="6">6 giorni</option>
                        <option selected="selected" value="7">7 giorni</option>
                        <option value="10">10 giorni</option>
                        <option value="14">14 giorni</option>
                    </select>
                </td>
                <td>
                    <select name="ratingDuration" id="ratingDuration">
                        <option value="3">3 giorni</option>
                        <option value="4">4 giorni</option>
                        <option value="5">5 giorni</option>
                        <option value="6">6 giorni</option>
                        <option selected="selected" value="7">7 giorni</option>
                        <option value="10">10 giorni</option>
                        <option value="14">14 giorni</option>
                        <option value="30">30 giorni</option>
                        <option value="60">60 giorni</option>
                        <option value="90">90 giorni</option>
                    </select>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>Descrizione:</td>
            </tr>
            <tr>
                <td><textarea id="description" name="description" style="width:394px; height:170px;"></textarea></td>
            </tr>
        </table>
        <table>
            <tr>
                <td>Utenti ammessi:</td>
                <td>Selezione vincitore:</td>
            </tr>
            <tr>
                <td>
                    <input checked="yes" type="radio" name="contestType" value="open" /> Aperto a tutti <br/>
                    <input type="radio" name="contestType" value="private" /> Selezione indviduale 
                </td>
                <td>
                    <input onchange="disableVoting();" checked="yes" type="radio" name="contestType_winnerSelection" value="1" /> Votazione da parte degli utenti <br/>
                    <input onchange="disableVoting();" type="radio" name="contestType_winnerSelection" value="0" /> Selezione diretta vincitore 
                </td>
            </tr>
        </table>
        <br/>
        <input type="button" onclick="submitContest();" value="Aggiungi Contest..."/>
        <input type="hidden" name="vidwiz-oper" value="vidwiz_insert_contest"/>
    </form>
</div>

<div  id="vidwiz_tabs-2">
   
</div>
|£|/if|\£|
|£|if $author == "true" || $administrator == "true"|\£|
    <div  id="vidwiz_tabs-|£|$nr_upload|\£|">
        
    <div id="uploadVideo">
    
    </div>
    <div class="clr"></div>
    </div>
    <div  id="vidwiz_tabs-|£|$nr_stats|\£|">
        <h1>Statistiche</h1>
    </div>
|£|/if|\£|
</div>
<div id="eventi"></div><div class="clr"></div>